﻿using System;
using System.Collections.Generic;
using System.Text;
using AMS.DataAccess.BO.Enums;

namespace AMS.DataAccess.BO
{
    [DBTable("TC_Customer")]
    public class CustomerInfo
    {
        #region Database Column Fields
        [DBPrimaryKeyColumn("AID", true, true)]
        public int AID { get; set; }

        [DBColumn("Name")]
        public string Name { get; set; }

        [DBColumn("Name_En")]
        public string Name_En { get; set; }

        [DBEnumColumn("CustomerType", typeof(CustomerType))]
        public CustomerType CustomerType { get; set; }

        [DBEnumColumn("BusinessType", typeof(CustomerBusinessType))]
        public CustomerBusinessType BusinessType { get; set; }

        [DBColumn("IDCode")]
        public string IDCode { get; set; }

        [DBColumn("isApplicant")]
        public bool IsApplicant { get; set; }

        [DBColumn("isCustomer")]
        public bool IsCustomer { get; set; }

        [DBEnumColumn("CreditLevel", typeof(CustomerCreditLevel))]
        public CustomerCreditLevel CreditLevel { get; set; }

        [DBColumn("CountryID")]
        public string CountryID { get; set; }

        [DBColumn("ProvinceId")]
        public string ProvinceId { get; set; }

        [DBColumn("CityId")]
        public string CityId { get; set; }

        [DBColumn("Address")]
        public string Address { get; set; }

        [DBColumn("ZipCode")]
        public string ZipCode { get; set; }

        [DBColumn("Address2")]
        public string Address2 { get; set; }

        [DBColumn("ZipCode2")]
        public string ZipCode2 { get; set; }

        //[DBColumn("Fax")]
        //public string Fax { get; set; }

        [DBColumn("Tel")]
        public string Tel { get; set; }

        [DBColumn("HomePage")]
        public string HomePage { get; set; }

        [DBColumn("Note")]
        public string Note { get; set; }

        [DBColumn("SpecialNeeds")]
        public string SpecialNeeds { get; set; }

        [DBColumn("Represent")]
        public string Represent { get; set; }

        [DBColumn("RepresentPosition")]
        public string RepresentPosition { get; set; }

        [DBColumn("ModifiedUser", true, false)]
        public string ModifiedUser { get; set; }

        [DBDateTime("ModifiedDate", DateTimeType.DateTime, true, false)]
        public DateTime ModifiedDate { get; set; }

        [DBColumn("CreateUser")]
        public string CreateUser { get; set; }

        [DBDateTime("CreateDate", DateTimeType.DateTime, true, true)]
        public DateTime CreateDate { get; set; }

        [DBColumn("ProvinceName", true, true)]
        public string ProvinceName { get; set; }

        [DBColumn("CityName", true, true)]
        public string CityName { get; set; }

        [DBColumn("Version", false, false)]
        public string Version { get; set; }
        #endregion

        public IList<ContactorInfo> Contactors { get; set; }
    }
}
